﻿using System;

class AllNumbersDivisibleBy3And7
{
    static void Main(string[] args)
    {
        Console.Write("Enter a number: ");
        string consoleInput = Console.ReadLine();
        int n = int.Parse(consoleInput);
        Console.WriteLine("Numbers from 1 to {0} that are not divisible by 3 and 7 at the same time:", n);
        for (int i = 1; i <= n; i++)
        {
            if(!(i%3 == 0 && i%7 == 0))
            {
                Console.WriteLine(i);
            }
        }
    }
}


